﻿-- =========================================================================================================
-- Author:		MICHAEL RITACCO
-- Copyright:	2010 MEKHANO GROUP LLC
-- Version:		08/21/2010 1.0
-- =========================================================================================================
CREATE PROCEDURE [flcrTM].[api_tm_service_sel_warp]
	@SERVICE_ID int
	,@TIME_KEY int

AS
BEGIN
	SELECT 	[TM_SERVICE_ID]
			,[TIME_KEY]
			,[SERVICE_ID]
			,[AUDIT_USER]
			,[AUDIT_DTTM]
			,[AUDIT_DTTM_TZ] 
			,[AUDIT_MOD_USER]
			,[AUDIT_MOD_DTTM]
			,[AUDIT_MOD_DTTM_TZ] 
			,[RLS_MASK]
			,[RLS_OWNER]
			,[BUILTIN]
			,[WRKFL_ITEM_ID]
			,[WRKFL_STATUS_ID]
			,[ACTIVE_FLG]
			,[SORT_ORDER]
			,[SERVICE_NAME]
			,[SERVICE_SNAME]
			,[SERVICE_DESC]
			,[SERVICE_TYPE]
			,[PARENT_ID]
			,[DOMAIN_ID]
			,[ORG_ID]
			,[RESOURCE_ID]
			,[SUPPLIER_ID]  
			,[SLA_ID]
	  FROM	flcrTm.[SERVICE]
	 WHERE	[SERVICE_ID] = @SERVICE_ID
	   AND	[TIME_KEY] = ([flcrTM].[TimeWarp_SERVICE](@TIME_KEY, @SERVICE_ID))

END